﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SorketServer
{
    public partial class Toolcs : Form
    {
        public Toolcs()
        {
            InitializeComponent();
            this.Load += Toolcs_Load;
        }

        private void Toolcs_Load(object sender, EventArgs e)
        {
            var mobiles = CarHelper.GetMobiles();
            cmbMobile.DataSource = mobiles;
            cmbMobile.DisplayMember = "Name";
            cmbMobile.ValueMember = "Id";
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
          object obj= cmbMobile.SelectedValue;
            Guid mobileId = (Guid)cmbMobile.SelectedValue;
            CarHelper.Import(mobileId);
            MessageBox.Show("导入完成");
        }
    }
}
